package com.exam.serviceImpl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.exam.mapper.ExamManageMapper;
import com.exam.pojo.ApiResult;
import com.exam.pojo.ExamManage;
import com.exam.pojo.Score;
import com.exam.service.ExamManageService;
import org.apache.ibatis.annotations.Options;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ExamManageServiceImpl implements ExamManageService {
    @Autowired
    private ExamManageMapper examManageMapper;

    @Override
    public List<ExamManage> findAll() {
       return examManageMapper.findAll();
    }

    @Override
    public IPage<ExamManage> findAll(Page<ExamManage> examManagePage) {
        return examManageMapper.findAll(examManagePage);
    }

    @Override
    public ExamManage findById(Integer examCode) {
        return examManageMapper.findById(examCode);
    }

    @Override
    public int deleteById(Integer examCode) {
        return examManageMapper.deleteByIds(examCode);
    }
    //更新数据
    @Override
    public int updateById(ExamManage examManage) {

        return examManageMapper.updateById(examManage);
    }
    //添加考试数据
    @Override
    public int insertBy(ExamManage examManage) {
        return examManageMapper.insert(examManage);
    }

    @Override
    public ExamManage ManagePaperId() {
        return examManageMapper.ManagePaperId();
    }
}
